#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gtk/gtk.h>

#include "callbacks.h"
#include "interface.h"
#include "support.h"

#include "fileAttente_Personnel.h"

//<<<<<<< .mine


//<<<<<<< .mine

//=======

void
on_Affichage_Liste_Personnel_Button_clicked
                                        (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

	/*GtkWidget *Affichage_Liste_Personnel_Label;


int i,j;



char id[100];
char capt[20];

char affichage[50];
char idcaptstatus[200];


char all[10000]="";

	Affichage_Liste_Personnel_Label = lookup_widget(objet_graphique,"Affichage_Liste_Personnel_Label");


    if (enreg->tab[0].id != NULL) {

    sprintf(affichage,"****Affichage****\n");
    strcat(all,affichage);
    sprintf(idcaptstatus,"ID            Capteurs\n");
    strcat(all,idcaptstatus);

    for (i=0 ; i<(enreg->nb); i++)
    {


        sprintf(id,"%d        ",(enreg->tab[i].id));
	strcat(all,id);
        for (j=0; j<(nbCapts-1); j++)
        {
            if (strcmp(&(enreg->tab[i].capteurs[j]),"") != 0 ){
            sprintf(capt,"%s ",&(enreg->tab[i].capteurs[j]));
	    strcat(all,capt);
            }else {

                sprintf(capt,"--");
		strcat(all,capt);

            }


        }

      //  printf("j:%d-%d\n",j,nbCapts-1);
        if (j == (nbCapts-1))
        {
            if (strcmp(&(enreg->tab[i].capteurs[nbCapts-1]),"") != 0){
            sprintf(capt,"%s\n",&(enreg->tab[i].capteurs[nbCapts-1]));
            strcat(all,capt);
            }else {

                sprintf(capt,"--\n");
		strcat(all,capt);
            }

        }



    }

    }else {

    sprintf(affichage,"****Affichage****\n");
    strcat(all,affichage);	
    sprintf(idcaptstatus,"ID            Capteurs\n");
    strcat(all,affichage);


    }

	gtk_label_set_text(GTK_LABEL(Affichage_Liste_Personnel_Label),all);
*/
}
void on_Affichage_Alerte_Personnel_Button_clicked (GtkWidget       *objet_graphique,gpointer         user_data)
{
	
}


void
on_Affichage_FileAttente_Personnel_Button_clicked
                                        (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}


void
on_Transferer_Personnel_Button_clicked (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}

//=======

void
on_Ajouter_Personnel_Button_clicked    (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
//>>>>>>> .r50
{

}


void
on_Supprimer_Personnel_Button_clicked  (GtkWidget *objet_graphique,gpointer user_data)
{

}


void
on_Rechercher_Personnel_Label_clicked(GtkWidget *objet_graphique,gpointer user_data)
{

}

//<<<<<<< .mine

void
on_Entrer_Button_clicked (GtkWidget *objet_graphique,gpointer user_data)
{
GtkWidget *entry1;
 GtkWidget *entry2;
//<<<<<<< .mine
 GtkWidget *Main_Board;
 GtkWidget *Affichage_Authentification_Label;
//=======
GtkWidget *mainboard;
//>>>>>>> .r53

//<<<<<<< .mine
 Affichage_Authentification_Label = lookup_widget(objet_graphique,"Affichage_Authentification_Label");

//=======
//>>>>>>> .r53
char message[50];

 char password[5],username[10];
    char ch1[]="docteur",ch2[]="directeur";
    char mp1[]="10001",mp2[]="10002";

   int i=1;
   
   

     


entry1 = lookup_widget(objet_graphique,"Login_Entry");
entry2 = lookup_widget(objet_graphique,"Password_Entry");
strcpy(username,gtk_entry_get_text(GTK_ENTRY(entry1)));
strcpy(password,gtk_entry_get_text(GTK_ENTRY(entry2)));

if (((strcmp(username,ch1)==0) && (strcmp(mp1,password)==0))||((strcmp(username,ch2)==0) &&strcmp(mp2,password)==0))
    {
//<<<<<<< .mine
sprintf(message,"");
gtk_label_set_text(GTK_LABEL(Affichage_Authentification_Label),message);
Main_Board = create_Main_Board ();
 gtk_widget_show (Main_Board);
//=======

//>>>>>>> .r53


}else{
sprintf(message,"erreur login ou password \n ou les deux");
gtk_label_set_text(GTK_LABEL(Affichage_Authentification_Label),message);
i++;

}
/*if (i>3){
sprintf(message,"Votre compte a été bloqué");
	gtk_label_set_text(GTK_LABEL(Affichage_Authentification_Label),message);
enter = 0;
}*/
fflush(stdin);
fflush(stdout);

}


void
on_Quitter_Button_clicked (GtkWidget *objet_graphique,gpointer user_data)
{
	gtk_main_quit();
}

//=======
//>>>>>>> .r49
//>>>>>>> .r50




void
on_MiseAjour_Personnel_Label_clicked   (GtkWidget *objet_graphique,gpointer user_data)
{

}







void
on_GestionPersonnel_Button_clicked     (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{
	GtkWidget *Gestion_Personnel;
	
Gestion_Personnel = create_Gestion_Personnel();
gtk_widget_show (Gestion_Personnel);


}


void
on_GestionPatient_Button_clicked       (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{
GtkWidget *Gestion_Patient;
	
Gestion_Patient = create_Gestion_Patient();
gtk_widget_show (Gestion_Patient);
}


void
on_Info_MainBoard_Button_clicked       (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}


void
on_Quitter_MainBoard_Button_clicked    (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{
	gtk_main_quit();
}


void
on_Ajouter_Patient_Button_clicked      (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}


void
on_Modifier_Patient_Button_clicked     (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}


void
on_Rechercher_Patient_Button_clicked   (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}


void
on_Afficher_FileAttente_Patient_Button_clicked
                                        (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}


void
on_Transferer_fileAttente_Patient_Button_clicked
                                        (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}


void
on_Afficher_ListePatient_Patient_Button_clicked
                                        (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}


void
on_Sauvegarder_Patient_Button_clicked  (GtkWidget       *objet_graphique,
                                        gpointer         user_data)
{

}




